public class DiGuiDemo {
    public static int getSum(int n){
        if (n==1){
            return 1;
        }
        return getSum(n-1)+n;
//        sumn=sum(n-1)+numn;
    }

    public static void main(String[] args) {
        int sum=0;
        sum=getSum(5);
        System.out.println(sum);
    }
}
